package com.zwkj.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zwkj.pojo.vo.WUserTVo;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

import org.springframework.beans.BeanUtils;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zwkj.domain.WUserT;
import com.zwkj.service.IWUserTService;
import com.zwkj.mapper.WUserTMapper;
import org.springframework.stereotype.Service;

/**
 * @author 小间隙
 * @description 针对表【w_user_t】的数据库操作Service实现
 * @createDate 2023-12-11 11:18:22
 */
@Service
public class WUserTServiceImpl extends ServiceImpl<WUserTMapper, WUserT>
        implements IWUserTService {

    @Autowired
    private IWUserTService wUserTService;


    @Override
    public void addWUserT(WUserTVo wUserTVo) {
        WUserT wUserT = new WUserT();
        BeanUtils.copyProperties(wUserTVo, wUserT);

        wUserTService.save(wUserT);
    }

    @Override
    public IPage<WUserTVo> getWUserTPageList(IPage<WUserTVo> page, WUserTVo wUserTVo) {
        return this.baseMapper.getWUserTPageList(page, wUserTVo);
    }


    @Override
    public List<WUserTVo> getWUserTList(WUserTVo wUserTVo) {
        return this.baseMapper.getWUserTList(wUserTVo);

    }

    @Override
    public WUserT getWUserTById(String id) {
        return wUserTService.getById(id);
    }


    @Override
    public void delWUserT(String id) {
        wUserTService.removeById(id);
    }


    @Override
    public void updateWUserT(WUserTVo wUserTVo) {
        WUserT wUserT = new WUserT();
        BeanUtils.copyProperties(wUserTVo, wUserT);
        wUserTService.updateById(wUserT);
    }
}




